home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BackColor = &H00FFFFFF&
- Caption = "What's My Number?"
- ClientHeight = 4575
- ClientLeft = 1245
- ClientTop = 1755
- ClientWidth = 7695
- Height = 5265
- Icon = NUMFORM.FRX:0000
- Left = 1185
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 4575
- ScaleWidth = 7695
- Top = 1125
- Width = 7815
- Begin CommandButton Command1
- Caption = "Give up"
- Height = 735
- Left = 1440
- TabIndex = 8
- Top = 3600
- Width = 1455
- End
- Begin CommandButton OK
- Caption = "OK"
- Default = -1 'True
- Height = 735
- Left = 5520
- TabIndex = 2
- Top = 1080
- Width = 1575
- End
- Begin TextBox Text1
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 24
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 735
- Left = 3240
- TabIndex = 0
- Top = 1080
- Width = 1935
- End
- Begin Label Label5
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 24
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 5160
- TabIndex = 5
- Top = 3720
- Width = 615
- End
- Begin Label Label4
- BackColor = &H00FFFFFF&
- Caption = "Turns:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 24
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 495
- Left = 3600
- TabIndex = 4
- Top = 3720
- Width = 1455
- End
- Begin Label Label3
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Times New Roman"
- FontSize = 24
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 615
- Left = 840
- TabIndex = 6
- Top = 2160
- Width = 5775
- End
- Begin Label Label1
- BackColor = &H00FFFFFF&
- Caption = "Enter your guess in the box to the right, then press Enter."
- Height = 495
- Left = 480
- TabIndex = 1
- Top = 1200
- Width = 2535
- End
- Begin Label Label6
- BackColor = &H00FFFFFF&
- Caption = "1000"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 375
- Left = 5880
- TabIndex = 7
- Top = 480
- Width = 1095
- End
- Begin Label Label2
- BackColor = &H00FFFFFF&
- Caption = "Please choose a number between 1 and "
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 12
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 375
- Left = 960
- TabIndex = 3
- Top = 480
- Width = 4935
- End
- Begin Menu file
- Caption = "&Game"
- Begin Menu new
- Caption = "&New"
- Shortcut = {F2}
- End
- Begin Menu ex
- Caption = "E&xit"
- Shortcut = ^X
- End
- Begin Menu dash
- Caption = "-"
- Index = 2
- End
- Begin Menu abt
- Caption = "&About WM#?..."
- End
- End
- Begin Menu options
- Caption = "&Options"
- Begin Menu highlow
- Caption = "&Higher/Lower"
- Checked = -1 'True
- End
- Begin Menu hotcold
- Caption = "Hot/&Cold"
- End
- Begin Menu dasher
- Caption = "-"
- Index = 1
- End
- Begin Menu boundaries
- Caption = "&Set Boundaries..."
- End
- Begin Menu colorscheme
- Caption = "&Background Color"
- Begin Menu green
- Caption = "&Green"
- End
- Begin Menu blue
- Caption = "&Blue"
- End
- Begin Menu red
- Caption = "&Red"
- End
- Begin Menu yellow
- Caption = "&Yellow"
- End
- Begin Menu purple
- Caption = "&Purple"
- End
- Begin Menu bluegray
- Caption = "Bl&ue-Gray"
- End
- Begin Menu gray
- Caption = "Gr&ay"
- End
- Begin Menu white
- Caption = "&White"
- Checked = -1 'True
- End
- End
- End
- Begin Menu help
- Caption = "&Help"
- End
- Sub about_Click ()
- Load about
- about.Show
- End Sub
- Sub abt_Click ()
- Load about
- about.Show
- End Sub
- Sub blue_Click ()
- green.checked = 0
- blue.checked = -1
- red.checked = 0
- yellow.checked = 0
- purple.checked = 0
- bluegray.checked = 0
- gray.checked = 0
- white.checked = 0
- h = &HFFFF00
- form1.backColor = h
- label1.backColor = h
- label2.backColor = h
- label3.backColor = h
- label4.backColor = h
- label5.backColor = h
- label6.backColor = h
- End Sub
- Sub bluegray_Click ()
- green.checked = 0
- blue.checked = 0
- red.checked = 0
- yellow.checked = 0
- purple.checked = 0
- bluegray.checked = -1
- gray.checked = 0
- white.checked = 0
- h = &H808000
- form1.backColor = h
- label1.backColor = h
- label2.backColor = h
- label3.backColor = h
- label4.backColor = h
- label5.backColor = h
- label6.backColor = h
- End Sub
- Sub boundaries_Click ()
- message$ = "Pick a number between 1 and:"
- response$ = InputBox$(message$, "What's My Number?", label6.caption)
- If response$ = "" Then response$ = label6.caption
- t = Val(response$)
- label6.caption = Str$(t)
- Randomize
- x = Int(t * Rnd + 1)
- label5.caption = ""
- label3.caption = ""
- text1.enabled = -1
- OK.enabled = -1
- turns = 0
- command1.enabled = -1
- End Sub
- Sub Command1_Click ()
- command1.enabled = 0
- text1.enabled = 0
- OK.enabled = 0
- label3.caption = ""
- w$ = "The number was " + Str$(x)
- MsgBox w$, 64, "Chicken!!!"
- End Sub
- Sub ex_Click ()
- label4.caption = ""
- label5.caption = ""
- label3.caption = ""
- Unload form1
- End Sub
- Sub Form_Click ()
- If about.visible = -1 Then
- Beep
- about.Show
- End If
- End Sub
- Sub Form_Load ()
- t = 1000
- Randomize
- x = Int(t * Rnd + 1)
- End Sub
- Sub gray_Click ()
- green.checked = 0
- blue.checked = 0
- red.checked = 0
- yellow.checked = 0
- purple.checked = 0
- bluegray.checked = 0
- gray.checked = -1
- white.checked = 0
- h = &HC0C0C0
- form1.backColor = h
- label1.backColor = h
- label2.backColor = h
- label3.backColor = h
- label4.backColor = h
- label5.backColor = h
- label6.backColor = h
- End Sub
- Sub green_Click ()
- green.checked = -1
- blue.checked = 0
- red.checked = 0
- yellow.checked = 0
- purple.checked = 0
- bluegray.checked = 0
- gray.checked = 0
- white.checked = 0
- h = &HFF00&
- form1.backColor = h
- label1.backColor = h
- label2.backColor = h
- label3.backColor = h
- label4.backColor = h
- label5.backColor = h
- label6.backColor = h
- End Sub
- Sub help_Click ()
- MsgBox ("For help on What's My Number?, use Windows Notepad to open the file WHATSMYN.TXT."), 64, "What's My Number?"
- End Sub
- Sub highlow_Click ()
- command1.enabled = -1
- hotcold.checked = 0
- highlow.checked = -1
- h = 0
- x = Int(t * Rnd + 1)
- label5.caption = ""
- label3.caption = ""
- text1.enabled = -1
- OK.enabled = -1
- turns = 0
- End Sub
- Sub hotcold_Click ()
- command1.enabled = -1
- hotcold.checked = -1
- highlow.checked = 0
- h = 1
- x = Int(t * Rnd + 1)
- label5.caption = ""
- label3.caption = ""
- text1.enabled = -1
- OK.enabled = -1
- turns = 0
- End Sub
- Sub new_Click ()
- command1.enabled = -1
- Randomize
- x = Int(t * Rnd + 1)
- label5.caption = ""
- label3.caption = ""
- text1.enabled = -1
- OK.enabled = -1
- turns = 0
- End Sub
- Sub OK_Click ()
- If h = 1 Then
- turns = turns + 1
- label5.caption = Str$(turns)
- y = Val(text1.text)
- r = t * .001
- If y < 1 Or y > t Then
- label3.caption = "Invalid answer."
- turns = turns - 1
- ElseIf Abs(x - y) > r * 700 Then
- label3.caption = "Freezing cold!"
- ElseIf Abs(x - y) > r * 500 Then
- label3.caption = "You're pretty cold."
- ElseIf Abs(x - y) > r * 200 Then
- label3.caption = "A light breeze."
- ElseIf Abs(x - y) > r * 100 Then
- label3.caption = "Kinda lukewarm."
- ElseIf Abs(x - y) > r * 50 Then
- label3.caption = "Pretty hot."
- ElseIf Abs(x - y) > r * 20 Then
- label3.caption = "Getting very hot."
- ElseIf Abs(x - y) > r * 10 Then
- label3.caption = "Ouch, it's so hot!"
- ElseIf Abs(x - y) > r * 5 Then
- label3.caption = "It's boiling hot!"
- ElseIf Abs(x - y) > r Then
- label3.caption = "You're burning up!!"
- ElseIf Abs(x - y) > 0 Then
- label3.caption = "The heat is unbearable!!!"
- Else
- text1.enabled = 0
- OK.enabled = 0
- label3.caption = ""
- command1.enabled = 0
- MsgBox "You got the number!", 48, "Congratulations"
- End If
- turns = turns + 1
- label5.caption = Str$(turns)
- y = Val(text1.text)
- If y < 1 Or y > t Then
- label3.caption = "Invalid answer."
- turns = turns - 1
- ElseIf y < x Then
- label3.caption = "Higher"
- ElseIf y > x Then
- label3.caption = "Lower"
- Else
- text1.enabled = 0
- OK.enabled = 0
- label3.caption = ""
- command1.enabled = 0
- MsgBox "You got the number!", 48, "Congratulations"
- End If
- End If
- text1.text = ""
- End Sub
- Sub purple_Click ()
- green.checked = 0
- blue.checked = 0
- red.checked = 0
- yellow.checked = 0
- purple.checked = -1
- bluegray.checked = 0
- gray.checked = 0
- white.checked = 0
- h = &HFF00FF
- form1.backColor = h
- label1.backColor = h
- label2.backColor = h
- label3.backColor = h
- label4.backColor = h
- label5.backColor = h
- label6.backColor = h
- End Sub
- Sub red_Click ()
- green.checked = 0
- blue.checked = 0
- red.checked = -1
- yellow.checked = 0
- purple.checked = 0
- bluegray.checked = 0
- gray.checked = 0
- white.checked = 0
- h = &HFF&
- form1.backColor = h
- label1.backColor = h
- label2.backColor = h
- label3.backColor = h
- label4.backColor = h
- label5.backColor = h
- label6.backColor = h
- End Sub
- Sub white_Click ()
- green.checked = 0
- blue.checked = 0
- red.checked = 0
- yellow.checked = 0
- purple.checked = 0
- bluegray.checked = 0
- gray.checked = 0
- white.checked = -1
- h = &HFFFFFF
- form1.backColor = h
- label1.backColor = h
- label2.backColor = h
- label3.backColor = h
- label4.backColor = h
- label5.backColor = h
- label6.backColor = h
- End Sub
- Sub yellow_Click ()
- green.checked = 0
- blue.checked = 0
- red.checked = 0
- yellow.checked = -1
- purple.checked = 0
- bluegray.checked = 0
- gray.checked = 0
- white.checked = 0
- h = &HFFFF&
- form1.backColor = h
- label1.backColor = h
- label2.backColor = h
- label3.backColor = h
- label4.backColor = h
- label5.backColor = h
- label6.backColor = h
- End Sub
-